package net.diaowen.dwsurvey.dao.impl;

import net.diaowen.common.dao.BaseDaoImpl;
import net.diaowen.dwsurvey.dao.SurveyTodoTaskDao;
import net.diaowen.dwsurvey.entity.QuExcelColumn;
import net.diaowen.dwsurvey.entity.SurveyTodoTask;
import org.hibernate.Session;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 问卷代办 dao
 */
@Repository
public class SurveyTodoTaskDaoImpl extends BaseDaoImpl<SurveyTodoTask, String> implements SurveyTodoTaskDao {

    @Override
    public void saveAll(List<SurveyTodoTask> records) {
        Session session = getSession();
        for(int i = 0; i < records.size(); i++) {
            session.save(records.get(i));
        }
        session.flush();
        session.clear();
    }

}
